package com.jeesite.modules.car.entity;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.entity.TreeEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.modules.sys.entity.User;

@Table(name="h_car_log", alias="a", label="车辆日志信息", columns={
        @Column(name="id", attrName="id", label="id", isPK=true),
        @Column(name="user_code", attrName="userCode", label="用户编码"),
        @Column(name="car_id", attrName="carId", label="车辆id"),
        @Column(name="car_title", attrName="carTitle", label="车辆名称"),
        @Column(name="brand", attrName="brand", label="品牌", queryType=QueryType.LIKE),
        @Column(name="car_model", attrName="carModel", label="车型"),
        @Column(name="car_color", attrName="carColor", label="车身颜色"),
        @Column(name="original_price", attrName="originalPrice", label="原价"),
        @Column(name="sell_price", attrName="sellPrice", label="售价"),
        @Column(name="operate_type", attrName="operateType", label="操作类型", comment="0：新增，1：编辑信息，2：编辑图片，3：上架，4：下架，5：审核，6删除"),
        @Column(name="status", attrName="status", label="状态"),
        @Column(name="create_by", attrName="createBy", label="创建者", isUpdate=false, isQuery=false),
        @Column(name="create_date", attrName="createDate", label="创建时间", isUpdate=false, isQuery=false),
        @Column(name="update_by", attrName="updateBy", label="更新者"),
        @Column(name="update_date", attrName="updateDate", label="更新时间"),
        @Column(name="remarks", attrName="remarks", label="备注信息"),
},joinTable={
        @JoinTable(type= JoinTable.Type.LEFT_JOIN, entity= User.class, alias="u",
                on="a.user_code = u.user_code", attrName="this",
                columns={
                        @Column(name="user_name", attrName="userName", label="商户名称", queryType=QueryType.LIKE),
                }),
}, orderBy="a.update_date DESC"
)
public class CarLog extends DataEntity<CarLog> {

    private static final long serialVersionUID = 1L;

    private String userCode;    // 用户编码
    private String carId;    // 车辆id
    private String carTitle;   // 车辆名称
    private String brand;   // 品牌
    private String carModel;    // 车型
    private String carColor;    // 车身颜色
    private Integer originalPrice;    // 原价
    private Integer sellPrice;   // 售价
    private String operateType;    // 操作类型【0：新增，1：编辑信息，2：编辑图片，3：上架，4：下架，5：审核，6删除】
    private String userName;

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public String getCarId() {
        return carId;
    }

    public void setCarId(String carId) {
        this.carId = carId;
    }

    public String getCarTitle() {
        return carTitle;
    }

    public void setCarTitle(String carTitle) {
        this.carTitle = carTitle;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getCarModel() {
        return carModel;
    }

    public void setCarModel(String carModel) {
        this.carModel = carModel;
    }

    public String getCarColor() {
        return carColor;
    }

    public void setCarColor(String carColor) {
        this.carColor = carColor;
    }

    public Integer getOriginalPrice() {
        return originalPrice;
    }

    public void setOriginalPrice(Integer originalPrice) {
        this.originalPrice = originalPrice;
    }

    public Integer getSellPrice() {
        return sellPrice;
    }

    public void setSellPrice(Integer sellPrice) {
        this.sellPrice = sellPrice;
    }

    public String getOperateType() {
        return operateType;
    }

    public void setOperateType(String operateType) {
        this.operateType = operateType;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
}
